package cn.micai.base.collections;

import java.util.concurrent.CountDownLatch;

/**
 * 描述：
 * <p>
 *
 * @author: 赵新国
 * @date: 2018/6/11 16:15
 */
public class UIInitialization implements Runnable {

    CountDownLatch latch;

    UIInitialization(CountDownLatch latch) {
        this.latch=latch;
    }

    @Override
    public void run() {
        System.out.println("Initializing UI");
        try {
            Thread.sleep(3000);
        } catch (InterruptedException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        System.out.println("Done with UI Initialization");
        latch.countDown();
    }
}
